﻿@model List<DLULearningNetworkModel.Account>
@using DLULearningNetwork.Libs
@if (Model != null && Model.Count > 0)
{
    <table class="tbl1" cellspacing="0" style="margin-top: 10px;">
        <tr>
            <th>
                Avatar
            </th>
            <th>
                Họ
            </th>
            <th>
                Tên
            </th>
            <th>
                Nickname
            </th>
        </tr>
        @for (int i = 0; i < Model.Count; i++)
        { 
            <tr @if (i % 2 != 0)
                {
                    string str = "class=odd"; @str;
                } style="line-height:50px" friendAccountID = "@Model[i].AccountID_u">
                <td>
                <a href="/UserPage/UserHome/@Model[i].Nickname_s">
                    @if (!string.IsNullOrEmpty(Model[i].Avatar_s))
                    {
                        <img src="@Url.Content(Model[i].Avatar_s.Replace("Original","Small"))" alt="avatar" style="border:0;width:40px;height:40px;padding-top:5px;"/>
                    }
                    else
                    { 
                        <img src="@Url.Content("~/Content/Images/avatar.gif")" alt="avatar" style="border:0;width:40px;height:40px;padding-top:5px;"/>
                    }
                    </a>
                </td>
                <td>
                    <span style="display: block;">@Model[i].LastName_s</span>
                </td>
                <td>
                    <span style="display: block;">@Model[i].FirstName_s</span>
                </td>
                @*<td>
                    <a name="requestFriend" class="dlubtn" href="#" onclick="return false;">Xin Kết bạn</a>
                </td>*@
                <td>
                    <span style="display: block;">@Model[i].Nickname_s</span>
                </td>
            </tr>
        }
    </table>
    <div class="pagination pagination-left" style="margin-left: 3px;">
        <ul class="pager">
            @Html.Partial("UCPager2", new DLULearningNetwork.ViewModels.PagerViewModel2(ViewBag.TotalItems, Constants.DEFAULT_PAGESIZE, Constants.DEFAULT_FILES_PERPAGE,
                 ViewBag.CurrentPage))
        </ul>
    </div>
}
else
{
    <span>Không có kết quả nào, xin thử từ khóa khác</span>
}